// 个人信息小仓库
// 引入request
import request from '../../api/request.js'
import { Toast } from 'vant';

const state={
	user_info:{}
}

const actions={

	
	async get_user_info(context,token){
		let res= await request({
			url:'/member/profile',
			method:'get',
			headers:{
				'Authorization':token
			}
		})
		context.commit('GET_USER_INFO',res.result)
		
	}
}

const mutations={
	GET_USER_INFO(state,data){
		state.user_info=data
	}
}

const getters={
	
}


export default{
	// 开启命名仓库
	namespaced:true,
	state,
	actions,
	mutations,
	getters
}